package org.permission.controller;

import org.permission.pojo.guanli;
import org.permission.dao.guanliDao;
import org.permission.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/guanli")
@CrossOrigin("*")
public class guanliController {

    @Autowired
    private guanliDao guanliDao;

    @RequestMapping("/list")
    @ResponseBody
    public List<guanli> list() throws Exception{
        return guanliDao.getAll();
    }

}
